package edu.hunau.cxb.controller;

import edu.hunau.cxb.pojo.Emp;
import edu.hunau.cxb.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hb
 * @create 2020-04-15 10:35
 */
@RestController
public class EmpController {
    @Autowired
    private Emp emp;
    @Autowired
    @Qualifier("empBiz")
    private EmpService empBiz;

    @GetMapping("/emp")
    public String execute(){
        empBiz.add();
        return emp.toString();
    }
}
